using System;
using System.Collections;
using EPiServer.Common.Queries;

namespace EPiAbstractions.Common.Queries
{
    public interface IQueryHandlerFacade
    {
        TCollection GetQueryResult<TEntity, TCollection>(IQuery query) where TCollection : ICollection, IList, new();

        TCollection GetQueryResult<TEntity, TCollection>(IQuery query, Int32 page, Int32 pageSize) where TCollection : ICollection, IList, new();

        TCollection GetQueryResult<TEntity, TCollection>(IQuery query, Int32 page, Int32 pageSize, out Int32 totalItems) where TCollection : ICollection, IList, new();

        TCollection GetQueryResult<TEntity, TCollection>(IQuery query, TimeSpan? explicitCacheTime, Int32 page, Int32 pageSize,
                                                         out Int32 totalItems) where TCollection : ICollection, IList, new();

        void RemoveQueryResultCache(IQuery query);
    }
}